<!-- securePass.aspx -->
<%@ Page Language="VB" Debug="True" Strict="True" %>
<%@ Import Namespace="System.Web.Security" %>
<script runat="server">
Sub Page_Load (ByVal Sender As Object, _
               ByVal E As EventArgs)
   If IsPostBack Then
      Dim s As String
      s = "<b>MD5:</b> "
      s &= FormsAuthentication. _ 
                 HashPasswordForStoringInConfigFile _
                 (txtPass.Text, "md5")
      s &= "<br>"
      s &= "<b>SHA1:</b> "
      s &= FormsAuthentication. _
                 HashPasswordForStoringInConfigFile _
                 (txtPass.Text, "sha1")
      lblErgebnis.Text = s 
   End If
End Sub 
</script>
<html><body><head><title>Passwort verschlüsseln</title>
</head>
<h3>Passwort verschlüsseln</h3>
<form id="Form1" runat="server" >
Passwort 
<asp:TextBox runat="server" 
             id="txtPass"
             TextMode="password" /><br><br>
<asp:Button runat="server"
            id="btnOK"
            Text="Verschlüsseln" /><br><br>
<asp:Label runat="server"
           id="lblErgebnis" />
</form></body></html>
